package cn.wolfcode.ssm.mapper;

import cn.wolfcode.ssm.domain.Employee;
import cn.wolfcode.ssm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    void deleteByPrimaryKey(Long id);

    void insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    void updateByPrimaryKey(Employee record);

    List<Employee> ListAll();

    List<Employee> selectForList(QueryObject qo);

    void insertRelation(@Param("employeeId") Long employeeId, @Param("rolesIds") Long[] rolesIds);

    void deleteRelationById(Long id);

    Employee  selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    Employee selectByUsername(String username);

}